
import 'package:flutter/material.dart';
import '../bean/ui_const_bean.dart';

class WorkItemWidget extends StatelessWidget {
  final String title;
  final String    amount;
  WorkItemWidget(this.title,this.amount);
  @override
  Widget build(BuildContext context) {
    return Container(
      width: UIConstBean.FormItemWH,
      height: UIConstBean.FormItemWH + 5,
      color: Colors.white,
      child: Column(
        crossAxisAlignment: CrossAxisAlignment.start,
        children: <Widget>[
          Offstage(
            offstage: title.length == 0,
            child:Container(
              height: 15,
              color: Colors.white,
              child: Text(title,
                textAlign: TextAlign.left,
                style: TextStyle(color: Color(0xff666666), fontSize: 13,fontWeight: FontWeight.normal),
              ),
            ),
          ),
          Offstage(
            offstage: title.length > 0,
            child:Container(
              height: 17,
              width: 55,
              color: Color(0xffebebeb),
            )
          ),

          SizedBox(height: 3,),
          Expanded(
            child:Text(amount,
              textAlign: TextAlign.left,
              style: TextStyle(color: (amount == '-')?  Color(0xffF1F1F1) : Color(0xff3DBCC6), fontSize: 32,fontWeight: FontWeight.bold),
            ),
          ),
        ],
      ),
    );
  }
}